import { axios, axiosImage } from '@/utils/request'

export function addAnswer (parameter) {
  return axios({
    url: '/answer/addAnswer',
    method: 'post',
    data: parameter
  })
}

export function addAnswer2 (parameter) {
  return axios({
    url: '/answer/add',
    method: 'post',
    data: parameter
  })
}

export function answerInfoByQuestionId (parameter) {
  return axios({
    url: '/answer/answerInfoByQuestionId',
    method: 'post',
    data: parameter
  })
}

export function removeAnswer (parameter) {
  return axios({
    url: '/answer/removeAnswer',
    method: 'post',
    data: parameter
  })
}

export function uploadOptionPic (parameter) {
  return axiosImage({
    url: '/answer/uploadOptionPic',
    method: 'post',
    cache: false,
    processData: false,
    data: parameter
  })
}
